package com.mmz.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.mmz.common.utils.PageUtils;
import com.mmz.gulimall.product.entity.CategoryEntity;
import com.mmz.gulimall.product.vo.Catelog2Vo;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author yangzhenjiang
 * @email 1983337308@qq.com
 * @date 2020-07-28 14:37:45
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<CategoryEntity> listWithTree();

    void removeMenus(Long[] catIds);

    /**
     * 找到catelogId的完整路径；
     * [父/子/孙]
     * @param catelogId
     * @return
     */
    Long[] findCatelogPath(Long catelogId);

    void updateCascade(CategoryEntity category);

    /**
     * 获取一级分类
     * @return
     */
    List<CategoryEntity> getLevel1Categorys();

    /**
     * 获取所有二级分类
     * @return
     */
    Map<String, List<Catelog2Vo>> getCategoryService();
}

